import os

# 项目根目录
RootPath = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

# 静态文件目录
StaticsPath = os.path.join(RootPath, "web", "statics")

# 上传文件目录
UploadPath = os.path.join(RootPath, "web", "uploads")

# 临时文件目录
TempPath = os.path.join(RootPath, "temp")
if not os.path.exists(TempPath):
    os.makedirs(TempPath)

# 临时图片目录
TempImagePath = os.path.join(TempPath, "images")
if not os.path.exists(TempImagePath):
    os.makedirs(TempImagePath)

# 验证码图片目录
CaptchaPath = os.path.join(TempImagePath, "captcha")
if not os.path.exists(CaptchaPath):
    os.makedirs(CaptchaPath)

# 日志目录
LogPath = os.path.join(TempPath, "logs")
if not os.path.exists(LogPath):
    os.makedirs(LogPath)

# 数据库目录
DBConfigPath = os.path.join(RootPath, "utils", "drivers", "database", "config.yaml")

# 数据库文件目录
DBPath = os.path.join(RootPath, "utils", "drivers", "database", "db")
if not os.path.exists(DBPath):
    os.makedirs(DBPath)


